package com.hyt.it.ogt.ks.feign.hystrix;

import org.springframework.stereotype.Component;

import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.core.exception.NestedBusinessException;
import com.hyt.it.ogt.ks.feign.TpsClient;
import com.hyt.model.tps.vo.Bucket;

import lombok.extern.slf4j.Slf4j;

/**
 * @author liuhh
 */
@Component
@Slf4j
public class TpsClientHystrix implements TpsClient {

    @Override
    public String getQRCode(String officeId, String scene, String page, Integer width) {
        log.error("获取小程序二维码失败.进入熔断");
        throw new NestedBusinessException("获取小程序二维码失败");
    }

    @Override
    public String getWxConfig(String officeId) {
        log.error("获取微信配置信息失败.进入熔断");
        throw new NestedBusinessException("获取微信配置信息失败");
    }

    @Override
    public String getBucketTempCredential(String officeId) {
        log.error("获取bucket临时凭证失败.进入熔断");
        return null;
    }

    @Override
    public String wxLogin(String jsCode) {
        return null;
    }
    
    @Override
    public String getXyEvalResult(String requestUrl, String json) {
    	 log.error("获取测评报告信息失败.进入熔断");
         throw new NestedBusinessException("获取测评报告信息失败");
    }
    
    @Override
    public String getDayiToken(String requestUrl, String json) {
    	 log.error("获取大易token信息失败.进入熔断");
         throw new NestedBusinessException("获取大易token信息失败");
    }
    
    @Override
    public String sendScoreToDayi(String requestUrl, String json, String token) {
    	 log.error("成绩推送大易信息失败.进入熔断");
         throw new NestedBusinessException("成绩推送大易信息失败");
    }
    
    @Override
    public String getJinyuToken(String requestUrl, String json) {
    	 log.error("获取近屿token信息失败.进入熔断");
         throw new NestedBusinessException("获取近屿token信息失败");
    }
    
    @Override
    public String getCodingQuestionUrl(String requestUrl, String json) {
    	 log.error("获取近屿编程题地址信息失败.进入熔断");
         throw new NestedBusinessException("获取近屿编程题地址信息失败");
    }

    @Override
    public ApiResponse<Bucket> getHwObsCredential(String officeId) {
        log.error("获取华为云存储失败.进入熔断");
        throw new NestedBusinessException("获取华为云存储失败");
    }

    @Override
    public String getStringFromHuaweiObs(String path, String charset) {
        log.error("获取考生须知失败.进入熔断");
        throw new NestedBusinessException("获取考生须知失败");
    }

    @Override
    public String getFaceApp(String idCard, String name) {
        log.error("人脸核身参数失败.进入熔断");
        throw new NestedBusinessException("人脸核身参数失败");
    }
}
